package xyz.zq.sf.common.security.annotation;

import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import xyz.zq.sf.common.security.component.ResourceServerAutoConfiguration;
import xyz.zq.sf.common.security.component.SecurityBeanDefinitionRegistrar;

import java.lang.annotation.*;

/**
 * 安全资源服务注解
 *
 * @author hzq
 * @date 2021-01-30 17:26
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({ResourceServerAutoConfiguration.class, SecurityBeanDefinitionRegistrar.class})
public @interface EnableSecurityResourceServer {

}
